<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">应用名称：</label>
                            <div class="col-sm-8">
                                <select id="thirdsdkid" name="thirdsdkid" class="form-control" type="text"></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">应用ID：</label>
                            <div class="col-sm-8">
                                <input maxlength="60" id="unionappid" name="unionappid" class="form-control"
                                       type="text">
                            </div>
                            <input id="unionaccountid" name="unionaccountid" th:value="${unionaccountid}" type="hidden">
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/appjs/market/thirdSdkAdvunionRelationship/add.js">
</script>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        $.ajax({
            type: 'get',
            url: '/market/thirdSdkAdvunionRelationship/listAllthirdSdk?unionaccountid=' + $("#unionaccountid").val(),
            dataType: 'json',
            success: function (datas) {
                //返回list数据并循环获取
                var select = $("#thirdsdkid");
                for (var i = 0; i < datas.length; i++) {
                    select.append("<option value='" + datas[i].thirdSdkId + "'>"
                        + datas[i].thirdName + "</option>");
                }
            }
        });
    })
</script>
</body>
</html>
